import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import store from './store'
import config from '@/config/index';

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(router)
app.use(store)
app.use(ElementPlus, {
  locale: zhCn,
})
//设置全局变量
app.config.globalProperties.$baseUrl = process.env.NODE_ENV === 'production' ? ".." : config.baseUrl;
app.config.globalProperties.$sid = sid;
app.mount('#app')